import axios from '../http'


export function getIndexImage(params={}){
  return axios({
    method:'get',
    url:'/common/index/image',
    params
  })
}

export function getIndexWorks(params={}){
  return axios({
    method:'get',
    url:'/common/index/works',
    params
  })
}

export function getWorks(params={}){
  return axios({
    method:'get',
    url:'/common/works',
    params
  })
}

export function getIndexBlog(params={}){
  return axios({
    method:'get',
    url:'/common/index/blog',
    params
  })
}

export function getBlog(params={}){
  return axios({
    method:'get',
    url:'/common/blog',
    params
  })
}

export function getAbout(params={}){
  return axios({
    method:'get',
    url:'/common/about',
    params
  })
}

export function postUser(data={}){
  return axios({
    method:'post',
    url:'/common/login',
    data
  })
}

export function addUser(data={}){
  return axios({
    method:'post',
    url:'/common/register',
    data
  })
}

export function getUser(params={}){
  return axios({
    method:'get',
    url:'/user',
    params
  })
}

export function editBlog(data={}){
  return axios({
    method:'post',
    url:'/editblog',
    data
  })
}

export function editWorks(data={}){
  return axios({
    method:'post',
    url:'/editworks',
    data
  })
}

export function editUserPicture(data={}){
  return axios({
    method:'post',
    url:'/edituserpicture',
    data
  })
}

export function editUserExplains(data={}){
  return axios({
    method:'post',
    url:'/edituserexplains',
    data
  })
}

export function deleteBlog(params={}){
  return axios({
    method:'get',
    url:'/deleteblog',
    params
  })
}

export function editAbout(data={}){
  return axios({
    method:'post',
    url:'/editabout',
    data
  })
}

export function addAbout(data={}){
  return axios({
    method:'post',
    url:'/addabout',
    data
  })
}

export function deleteAbout(params={}){
  return axios({
    method:'get',
    url:'/deleteabout',
    params
  })
}

export function deleteImage(params={}){
  return axios({
    method:'get',
    url:'/deleteimage',
    params
  })
}

export function deleteWorks(params={}){
  return axios({
    method:'get',
    url:'/deleteworks',
    params
  })
}

export function check(params={}){
  return axios({
    method:'get',
    url:'/check',
    params
  })
}

export function getImage(params={}){
  return axios({
    method:'get',
    url:'/common/image',
    params
  })
}


export function addImage(data={}){
  return axios({
    method:'post',
    url:'/addimage',
    data
  })
}

export function search(data={}){
  return axios({
    method:'post',
    url:'/common/blog/search',
    data
  })
}
